/* 
 * Copyright (C) 2008-2010 Josef Hardi <josef.hardi@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package edu.bth.student.android.photohand.provider;

import android.net.Uri;
import android.provider.BaseColumns;

/**
 * Convenience definitions for PhotoHandContentProvider
 */
public class PhotoHandSchema {

  public static final String AUTHORITY = 
      "edu.bth.student.android.photohand.provider";

  // This class cannot be instantiated
  private PhotoHandSchema() {
  }

  public static final class Albums implements BaseColumns {
    // This class cannot be instantiated
    private Albums() {
    }

    /**
     * URI for accessing a specific album.
     */
    public static final Uri CONTENT_URI = 
        Uri.parse("content://" + AUTHORITY + "/albums");

    /**
     * The MIME type of {@link #CONTENT_URI} providing a directory of albums.
     */
    public static final String CONTENT_TYPE = 
        "vnd.android.cursor.dir/vnd.photohand.album";

    /**
     * The MIME type of a {@link #CONTENT_URI} sub-directory of a single album.
     */
    public static final String CONTENT_ITEM_TYPE = 
        "vnd.android.cursor.item/vnd.photohand.album";

    /**
     * The default sort order for table Album.
     */
    public static final String DEFAULT_SORT_ORDER = "updated_on DESC";

    /**
     * The title of the Album.
     * <P>
     * Type: TEXT
     * </P>
     */
    public static final String TITLE = "title";

    /**
     * The name of the Album owner.
     * <P>
     * Type: TEXT
     * </P>
     */
    public static final String OWNER = "owner";

    /**
     * The date on which the Album was added.
     * <P>
     * Type: TEXT
     * </P>
     */
    public static final String UPDATED_ON = "updated_on";
  }

  public static final class Photos implements BaseColumns {
    // This class cannot be instantiated
    private Photos() {
    }

    /**
     * URI for accessing a specific photo.
     */
    public static final Uri CONTENT_URI = 
        Uri.parse("content://" + AUTHORITY + "/photos");

    /**
     * The MIME type of {@link #CONTENT_URI} providing a directory of photos.
     */
    public static final String CONTENT_TYPE = 
        "vnd.android.cursor.dir/vnd.photohand.albumphoto";

    /**
     * The MIME type of a {@link #CONTENT_URI} sub-directory of a single photo.
     */
    public static final String CONTENT_ITEM_TYPE = 
        "vnd.android.cursor.item/vnd.photohand.albumphoto";

    /**
     * The default sort order for table Photo.
     */
    public static final String DEFAULT_SORT_ORDER = "published_on DESC";

    /**
     * The title of the Photo.
     * <P>
     * Type: TEXT
     * </P>
     */
    public static final String TITLE = "title";

    /**
     * The Internet address (URL) of the Photo.
     * <P>
     * Type: TEXT
     * </P>
     */
    public static final String URL = "url";

    /**
     * The date on which the Photo was published.
     * <P>
     * Type: TEXT
     * </P>
     */
    public static final String PUBLISHED_ON = "published_on";
  }
}
